<!DOCTYPE html>
<html>

<head>

    {include file="Public/header"}
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
</head>

<body style="color:#333;padding:3px;">
<!-- 标题 -->
<div class="page-heade">
    <h2 class="title_color text-center">流程设定</h2>
</div>
<!-- 标题 -->
<div>
    <form action="" class="form-inline">
        <table class="row-margin-top tab-content table-bordered table text-left" border="1">
            <tr>
                <td style="width:20%;">工作流名称</td>
                <td>{$data.FLOWNAME}<input type="hidden" name="flow_id" value="{$data.ID}"></td>
            </tr>
            <tr>
                <td>表单名称</td>
                <td>
                    <select name="table_id" id="" class="form-control">
                        <option value="">请选择</option>
                        {volist name="workflow" id="row"}
                        <option value="{$row.id}" {if request()->param('id')==$row.flow_id}selected{/if}>{$row.table_brief}</option>
                        {/volist}
                    </select>
                </td>
            </tr>
            <tr>
                <td></td>
                <td>
                    <button class="btn btn-info btn-sm save" type="submit">保存</button>
                    <button class="btn btn-info btn-sm back" type="button">返回</button>
                </td>
            </tr>
        </table>

    </form>
</div>
<!-- 全局js -->
{include file="Public/footer"}
<!-- <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> -->
<script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<!--统计代码，可删除-->
<script src="__STATIC__/layout/js/plugins/layer/laydate/laydate.js"></script>
<script>

    $(function () {
        $('.save').on('click',function () {
            var data = $(this).closest('form').serialize()
            $.post('',data,function (data) {
                if(data.success){
                    swal({title:data.msg},function () {
                        location.href='{:url("index")}'
                    })
                }else{
                    swal(data.msg)
                }
            },'json')
            return false
        })
        $('.back').click(function () {
            location.href='{:url("index")}'
        })
    })

</script>
</body>

</html>
